//渲染列表
axios.get('/user/list',{params:{page:1,count:5}}).then((res) => {
    // console.log(res.data);
    renderList(res.data.list)
})
function renderList(data) {
    var str = ``
    str = data.map((item, index) => {
        return `<tr>
                    <td>${item.email}</td>
                    <td>${item.name}</td>
                    <td>${item.phone}</td>
                    <td>${item.ingroup}</td>
                    <td>${item.isadmin?'是':'否'}</td>
                    <td>${item.status?'正常':'异常'}</td>
                    <td><span class="iconfont icon-xiugaioryijian"></span>&emsp;
                    <span class="iconfont icon-shanchu"></span></td> 
                </tr>`
    })
    if(str==''){
        str='<td style="text-align:center;color:red">未查询到数据</td>'
    }
    document.querySelector('tbody').innerHTML=str
}